<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-用户中心</title>
	<link rel="stylesheet" type="text/css" href="/css/reset.css">
	<link rel="stylesheet" type="text/css" href="/css/main.css">
	<link rel="stylesheet" type="text/css" href="/layui/css/layui.css">
</head>
<body>
	<div class="header_con">
		<div th:replace="header::top1"></div>
	</div>

	<div th:replace="search::top2"></div>

	<div class="main_con clearfix">
		<div class="left_menu_con clearfix">
			<h3>用户中心</h3>
			<ul>
				<li><a href="/page/userInfo">· 个人信息</a></li>
				<li><a href="/page/userOrder" class="active">· 全部订单</a></li>
				<li><a href="/page/userSite">· 收货地址</a></li>
			</ul>
		</div>
		<div id="orderList" class="right_content clearfix" >
				<h3 class="common_title2">全部订单</h3>
				<!--<ul class="order_list_th w978 clearfix">
					<li class="col01">2016-8-21 17:36:24</li>
					<li class="col02">订单号：56872934</li>
					<li class="col02 stress">未支付</li>		
				</ul>

				<table class="order_list_table w980">
					<tbody>
						<tr>
							<td width="55%">
								<ul class="order_goods_list clearfix">					
									<li class="col01"><img src="/images/goods02.jpg"></li>
									<li class="col02">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>	
									<li class="col03">1</li>
									<li class="col04">11.80元</li>	
								</ul>
								<ul class="order_goods_list clearfix">					
									<li class="col01"><img src="/images/goods02.jpg"></li>
									<li class="col02">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>	
									<li class="col03">1</li>
									<li class="col04">11.80元</li>	
								</ul>
							</td>
							<td width="15%">33.60元</td>
							<td width="15%">待付款</td>
							<td width="15%"><a href="#" class="oper_btn">去付款</a></td>
						</tr>
					</tbody>
				</table>
				
				<ul class="order_list_th w978 clearfix">
					<li class="col01">2016-8-21 17:36:24</li>
					<li class="col02">订单号：56872934</li>
					<li class="col02 stress">已支付</li>			
				</ul>
				<table class="order_list_table w980">
					<tbody>
						<tr>
							<td width="55%">
								<ul class="order_goods_list clearfix">					
									<li class="col01"><img src="/images/goods02.jpg"></li>
									<li class="col02">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>	
									<li class="col03">1</li>
									<li class="col04">11.80元</li>	
								</ul>
								<ul class="order_goods_list clearfix">					
									<li class="col01"><img src="/images/goods02.jpg"></li>
									<li class="col02">嘎啦苹果嘎啦苹果<em>11.80元/500g</em></li>	
									<li class="col03">1</li>
									<li class="col04">11.80元</li>	
								</ul>
							</td>
							<td width="15%">33.60元</td>
							<td width="15%">已付款</td>
							<td width="15%"><a href="#" class="oper_btn">查看物流</a></td>
						</tr>
					</tbody>
				</table>-->

				<!--<div class="pagenation">
					<a href="#">上一页</a>
					<a href="#" class="active">1</a>
					<a href="#">2</a>
					<a href="#">3</a>
					<a href="#">4</a>
					<a href="#">5</a>
					<a href="#">下一页></a>
				</div>-->
		</div>
		
		
	</div>



	<div class="footer">
		<div class="foot_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">招聘人才</a>
			<span>|</span>
			<a href="#">友情链接</a>		
		</div>
		<p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
		<p>电话：010-****888    京ICP备*******8号</p>
	</div>

	<script src="/jquery-2.1.4.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/mylayer.js"></script>

	<script type="text/javascript">

		layui.use([], function(){
			$.post(
				'/order/list',
				function (result) {
					console.log(result);
					if (result.code == 0){

						/*html+='<h3 class="common_title2">全部订单</h3>'*/
						$(result.data).each(function () {
							var html = '';
							html+='<ul class="order_list_th w978 clearfix">'
							html+='	<li class="col01">'+this.createTime+'</li>'
							html+='	<li class="col02">订单号：'+this.orderNo+'</li>'
							if (this.status == 0){
								html+='	<li class="col02 stress">已取消</li>'
							} else if (this.status == 1) {
								html+='	<li class="col02 noPay">未付款</li>'
							} else if (this.status == 2){
								html+='	<li class="col02 yesPay">已付款</li>'
							} else if (this.status == 3){
								html+='	<li class="col02 stress">已发货</li>'
							} else if (this.status == 4){
								html+='	<li class="col02 stress">交易成功</li>'
							} else {
								html+='	<li class="col02 stress">交易关闭</li>'
							}
							/*html+='	<li class="col02 stress">'+paystatus+'</li>'*/
							html+='	<li class="col02">总价：'+this.payment+'元</li>'
							/*html+='	<li class="col02"><a href="#" class="oper_btn">去付款</a></li>'*/
							html+='</ul>'
							$(this.list).each(function () {
								html+='<table class="order_list_table w980">'
								html+='	<tbody>'
								html+='	<tr>'
								html+='		<td width="55%">'
								html+='			<ul class="order_goods_list clearfix">'
								html+='				<li class="col01"><img src="/pic/'+this.productImage+'"></li>'
								html+='				<li class="col02">'+this.productName+'<em></em></li>'
								html+='				<li class="col03">数量：'+this.quantity+'</li>'
								html+='				<li class="col04">'+this.totalPrice+'元</li>'
								html+='			</ul>'
								html+='		</td>'
								html+='	</tr>'
								html+='	</tbody>'
								html+='</table>'
							});
							$('#orderList').append(html);
						});

					}
				}
			);
							
		});



	</script>
	
</body>
</html>